<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8" />
    <title>在线考试系统</title>
    <link rel="stylesheet" th:href="@{https://cdn.bootcss.com/semantic-ui/2.2.13/semantic.min.css}" />
    <link rel="stylesheet" th:href="@{/css/app.css}" />
    <link rel="stylesheet" th:href="@{/css/discuss/postDiscuss.css}" />
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/semantic-ui/2.2.13/semantic.min.js}"></script>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js}"></script>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/wangEditor/3.0.15/wangEditor.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/app.js}"></script>
    <script type="text/javascript" th:src="@{/js/discuss/postDiscuss.js}"></script>
</head>
<body>
<!-- 页面引用：菜单 -->
<div th:replace="common/menu :: menu"></div>

<div class="ui header container">
    <div class="ui large breadcrumb">
        <a class="section" th:href="@{/}"><i class="home icon"></i>首页</a>
        <i class="right chevron icon divider"></i>
        <a class="section" th:href="@{/discuss}">讨论区</a>
        <i class="right chevron icon divider"></i>
        <div class="active section">话题发布</div>
    </div>
</div>

<div class="ui postDiscuss container">
    <div class="ui negative message">
        <!--<i class="close icon"></i>-->
        <div class="header"><i class="warning icon"></i>注意</div>
        <p>请注意帖子的言语措辞,如果出现恶意中伤别人,诽谤他人,帖子将被删除,发帖人将会被惩罚。</p>
    </div>
    <form class="ui form">
        <div class="field">
            <div class="two fields">
                <div class="four wide field">
                    <select class="ui fluid dropdown">
                        <option value="0">选择板块</option>
                        <option value="1">我要提问</option>
                        <option value="2">技术交流</option>
                    </select>
                </div>
                <div class="twelve wide field">
                    <input id="postTitle" placeholder="标题：一句话说明你遇到的问题或想分享的经验" type="text" />
                </div>
            </div>
        </div>
        <div class="field" id="editor">
        </div>
        <button class="ui button">取消</button>
        <div class="positive ui button" id="postDiscussSubmitButton">发布</div>
    </form>
</div>
<!-- 不可抗力元素 -->
<div class="second-footer">
</div>
<!-- 页脚引用 -->
<div th:replace="common/footer :: footer"></div>
<!-- 登录模态框 -->
<div class="ui mini modal" id="loginModal">
    <div class="header">登录</div>
    <div class="content">
        <form class="ui form" id="loginModalForm">
            <div class="ui hidden negative message" id="loginModalErrorMessage">
                <!--
                <div class="header">错误提示</div>
                <p></p>
                -->
            </div>
            <div class="field required">
                <label>账号</label>
                <div class="ui left icon input">
                    <input id="username" type="text" placeholder="请输入学号或教工号或指定账号" />
                    <i class="user icon"></i>
                </div>
            </div>
            <div class="field required">
                <label>密码</label>
                <div class="ui left icon input">
                    <input id="password" type="password" />
                    <i class="lock icon"></i>
                </div>
            </div>
            <div class="field">
                <div class="ui toggle checkbox">
                    <input type="checkbox" id="rememberMe" name="rememberMe" tabindex="0" class="hidden" />
                    <label>记住登录</label>
                </div>
            </div>
            <div class="ui button" id="loginModalCloseButton">关闭</div>
            <div class="ui primary button" id="loginModalSubmitButton">登录</div>
        </form>
    </div>
</div>
<script th:inline="javascript">
    /*<![CDATA[*/
    var authorId = /*[[${data['authorId']}]]*/;
    var contextPath = /*[[${#httpServletRequest.getContextPath()}]]*/;

    $(function(){
        app.init(contextPath);
        postDiscussPage.init(authorId);
    });
    /*]]>*/
</script>
</body>
</html>